package com.jeecms.cms.manager.main;

import com.jeecms.common.page.Pagination;
import com.jeecms.cms.entity.assist.CmsEnterprise;

import java.util.List;
import java.util.Map;

/**
 * Created by Hashan on 2018-02-03.
 *
 */
public interface CmsEnterpriseMng {

    CmsEnterprise findById(Integer id);

    CmsEnterprise save(CmsEnterprise bean);

    CmsEnterprise update(CmsEnterprise updater);

    CmsEnterprise deleteById(Integer id);

    List<CmsEnterprise> getList(Map<String, Object> params);

    Pagination getPage(Map<String, Object> params);

    CmsEnterprise[] deleteByIds(Integer[] ids);

    CmsEnterprise getEnterpriseByInvitationCode(String invitationCode);

    /**
     * 查询出当前企业下所有的组织架构
     * @param enterpriseId 企业ID
     * @return 按照树形结构返回
     */
    List<Object[]> findBranchTreeForEn(Integer enterpriseId);
}
